# -*- coding: utf-8 -*-
from django import forms
from acaojudicial.models import AcaoJudicial, GrupoAcao

from djtools.formfields import BrDataField
from djtools.formwidgets import BrDataWidget

################
# ACAOJUDICIAL #
################

class AcaoJudicialForm(forms.ModelForm):
    class Meta:
        model = AcaoJudicial
    
    data = BrDataField(label=u'Data de Expedição', widget=BrDataWidget())
    
class GrupoAcaoBuscaForm(forms.Form):
# FIXME: Adicionar o campo descrição na busca!!!
#    descricao = forms.CharField(label=u'Descrição do Item', required=False, widget=forms.TextInput(attrs={'size':'50'}))
    acao = forms.ModelChoiceField(label=u'Ação', empty_label=u'Todos', 
                                    queryset=AcaoJudicial.objects.all(), required=False)
    
    METHOD = 'GET'
    TITLE = 'Busca de Ações Judiciais'